#ifndef LEDLOCATION_H
#define LEDLOCATION_H

#include <QWidget>
#include <Common/TvLayout.h>
#include <Common/led.h>

class QPaintEvent;

class LedLocation : public QWidget
{
	Q_OBJECT

	struct LedView{
		QRect rect;
		int type;
	};

	enum ViewType {LedEnable = 1, LedDisable};

	QList<Led*> list;
	TvLayout layout;
	QList<LedView> drawRects;
	QPoint start;
	int drawWidth;
	int drawHeight;
	QPoint click;

	int ScreenWidth;
	int ScreenHeight;
	float ScreenRatio;
public:
	explicit LedLocation(QWidget *parent = 0);

protected:
		void paintEvent(QPaintEvent *event);
		void resizeEvent(QResizeEvent *event);
		void mouseReleaseEvent ( QMouseEvent * e );

		void updateView();
signals:

public slots:

};

#endif // LEDLOCATION_H
